<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>计时器简单案例</title>
	</head>
	<body>
		<script>
			function myFun(){
				document.write("我爱javaScript"+"<br");
			}
			//3秒后输出
			//window.setTimeout(myFun,3000);
			//每隔3秒输出
			window.setInterval(myFun,3000);
		</script>
	</body>
</html>
